﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Competition.Application.DTO;
using Competition.Domain.Entity;

namespace Competition.Application.Interfaces
{
    public interface IProductService : IBaseService<Product>
    {
        /// <summary>
        /// 根据条件列表
        /// </summary>
        /// <param name="pageIndex">页面索引</param>
        /// <param name="pageSize">页面大小</param>
        /// <returns>列表</returns>
        Task<(PageDto pageDto, List<ProductDto> dtos)> FindListAsync(int pageIndex, int pageSize);

        Task<ProductDto> FindAsync(int id);
        Task<int> AddAsync(ProductDto dto);
        Task<bool> UpdateAsync(ProductDto dto);
    }
}